1. Field of the Invention
The present invention generally relates to Automatic Memory Management (AMM) coordination that is used by virtual machines to manage memory usage. Specifically, the present invention manages the execution of AMM agents' AMM cycles on a common server or system to minimize or eliminate any overlap between resource intensive memory management activities.
2. Related Art
Session Initiation Protocol (SIP) performance testing on various application servers revealed a problem with managing Automatic Memory Management (AMM) coordination latency in a clustered environment. It also applies to Hypertext Transfer Protocol (HTTP) sessions that are long lived, such as a shopping web site or a web site that hosts presentations. Some applications, which may be deployed on server clusters, are sensitive to message or request latency. For example, SIP signaling has request/response latency limits built into the messaging protocol, violation of which may trigger excessive message retransmission or SIP call failure. Retransmissions can dramatically increase the effective load on the network and servers without creating any additional value, thus decreasing the efficiency and increasing the cost of supporting a given level of service. Therefore it is critical to control request/response latency on networks supporting SIP or other latency-sensitive services. A key factor affecting latency in systems implemented using Java (or any other technology which relies on AMM) is the duration of foreground or ‘major’ resource intensive AMM activity (Java, Java Virtual Machine (JVM), and related terms are trademarks of Sun Microsystems, Inc. in the United States and/or other countries). During major AMM activity the system suspends all other processing or can reduce the amount of resources available to support an application, thus increasing the latency of any in-process transactions by an amount equal to the duration of the AMM activity. Therefore, managing major AMM duration is a well-recognized issue in the implementation of latency-sensitive web applications deployed on AMM-based systems such as Java. Web application servers may be scaled and/or deployed in High Availability (HA) mode by clustering (e.g., by logically grouping multiple Virtual Machines (VMs) on one or multiple processing platforms, into a single service-providing entity called a ‘cluster’). This enables a workload to be shared among multiple VMs, each with its own resource management environment. Specifically, each VM in the cluster can independently manage its own memory allocation, including its AMM activities. A cluster is a logical entity, which is a collection of processes that runs on one or more hardware servers, with one or more processes per server. A vertically scaled system is where several VMs execute on a single server. A horizontally scaled system is where several VMs execute on more than one hardware server. Within a vertically-scaled cluster (e.g., multiple VMs on one node), the existence of multiple independent AMM processes adds additional complexity to the issue of AMM latency due to the possibility of simultaneous AMM cycles occurring in the cluster. If multiple VMs on a single node attempt to perform AMM concurrently, the duration of one or more of the AMM activities will be extended due to the competition for the CPU with the other AMM work going on. This may result in AMM latency that is much longer than would be the case if the VMs were not on the same node. For example, if VM1 takes 500 milli-seconds for an AMM cycle and VM2 takes 500 milli-seconds for an AMM cycle, then if they both start at the same time, both will take 1 second during which no application processing is occurring. The problem of unpredictably excessive latency caused by simultaneous overlapping AMM cycles can be addressed by oversizing the processing capacity of the node, or by undersizing the workload allocated to the node, but these approaches will not be cost effective and are still vulnerable to unpredictable variations in AMM cycle latency caused by concurrent AMM cycles, as described previously. Therefore, there exists a need for an approach that addresses at least one of the above-referenced issues.